[PATCH] xcb: add a timeout control when reading INCR property
authorLiang Qi <liang.qi@qt.io>
Wed, 7 Jul 2021 11:19:14 +0000 (13:19 +0200)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Thu, 23 Sep 2021 13:02:33 +0000 (14:02 +0100)
commitaff3720fd1c59f4bfa2e9cdbca004bcb10d3dd69
tree0b6a94d5ae488d2c81596e620c237a3d076eabcc
parent8ebfee73db8563e99cf85f72733c5d01059736d8
[PATCH] xcb: add a timeout control when reading INCR property

For the first call of QXcbClipboard::clipboardReadProperty()
inside of clipboardReadIncrementalProperty() in getSelection(),
it will get a XCB_NONE reply before the contents arrived via
property change. Then we give a chance to read more.

Manually tested with following setups:
* examples/widgets/mainwindows/application with gvim(gtk3)
* examples/widgets/widgets/imageviewer with GIMP 2.10.18(based on
gtk2) and GIMP 2.99.6(based on gtk3 via flatpak)

Fixes: QTBUG-56595
Pick-to: 5.12 5.15 6.1 6.2
Done-With: JiDe Zhang <zhangjide@uniontech.com>
Change-Id: Ib45f08464d39ad79137b1da99808c89b7dca2d08
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Gbp-Pq: Name xcb_add_a_timeout_control_when_reading_INCR_property.diff
src/plugins/platforms/xcb/qxcbclipboard.cpp